home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 10 / AACD 10.iso / AACD / Magazine / Morphos / GCC / ppc-amigaos / include / powerup / ppcpragmas / wb_pragmas.h < prev   
C/C++ Source or Header  |  2000-02-28  |  6KB  |  186 lines

  1. /* Automatically generated header! Do not edit! */
  2.  
  3. #ifndef _PPCPRAGMA_WB_H
  4. #define _PPCPRAGMA_WB_H
  5. #ifdef __GNUC__
  6. #ifndef _PPCINLINE__WB_H
  7. #include <powerup/ppcinline/wb.h>
  8. #endif
  9. #else
  10.  
  11. #ifndef POWERUP_PPCLIB_INTERFACE_H
  12. #include <powerup/ppclib/interface.h>
  13. #endif
  14.  
  15. #ifndef POWERUP_GCCLIB_PROTOS_H
  16. #include <powerup/gcclib/powerup_protos.h>
  17. #endif
  18.  
  19. #ifndef NO_PPCINLINE_STDARG
  20. #define NO_PPCINLINE_STDARG
  21. #endif/* SAS C PPC inlines */
  22.  
  23. #ifndef WB_BASE_NAME
  24. #define WB_BASE_NAME WorkbenchBase
  25. #endif /* !WB_BASE_NAME */
  26.  
  27. #define    AddAppIconA(id, userdata, text, msgport, lock, diskobj, taglist)    _AddAppIconA(WB_BASE_NAME, id, userdata, text, msgport, lock, diskobj, taglist)
  28.  
  29. static __inline struct AppIcon *
  30. _AddAppIconA(void *WorkbenchBase, unsigned long id, unsigned long userdata, UBYTE *text, struct MsgPort *msgport, struct FileLock *lock, struct DiskObject *diskobj, struct TagItem *taglist)
  31. {
  32. struct Caos    MyCaos;
  33.     MyCaos.M68kCacheMode    =    IF_CACHEFLUSHALL;
  34. //    MyCaos.M68kStart    =    NULL;
  35. //    MyCaos.M68kSize        =    0;
  36.     MyCaos.PPCCacheMode    =    IF_CACHEFLUSHALL;
  37. //    MyCaos.PPCStart        =    NULL;
  38. //    MyCaos.PPCSize        =    0;
  39.     MyCaos.d0        =(ULONG) id;
  40.     MyCaos.d1        =(ULONG) userdata;
  41.     MyCaos.a0        =(ULONG) text;
  42.     MyCaos.a1        =(ULONG) msgport;
  43.     MyCaos.a2        =(ULONG) lock;
  44.     MyCaos.a3        =(ULONG) diskobj;
  45.     MyCaos.a4        =(ULONG) taglist;
  46.     MyCaos.caos_Un.Offset    =    (-60);
  47.     MyCaos.a6        =(ULONG) WorkbenchBase;    
  48.     return((struct AppIcon *)PPCCallOS(&MyCaos));
  49. }
  50.  
  51. #ifndef NO_PPCINLINE_STDARG
  52. #define AddAppIcon(a0, a1, a2, a3, a4, a5, tags...) \
  53.     ({ULONG _tags[] = { tags }; AddAppIconA((a0), (a1), (a2), (a3), (a4), (a5), (struct TagItem *)_tags);})
  54. #endif /* !NO_PPCINLINE_STDARG */
  55.  
  56. #define    AddAppMenuItemA(id, userdata, text, msgport, taglist)    _AddAppMenuItemA(WB_BASE_NAME, id, userdata, text, msgport, taglist)
  57.  
  58. static __inline struct AppMenuItem *
  59. _AddAppMenuItemA(void *WorkbenchBase, unsigned long id, unsigned long userdata, UBYTE *text, struct MsgPort *msgport, struct TagItem *taglist)
  60. {
  61. struct Caos    MyCaos;
  62.     MyCaos.M68kCacheMode    =    IF_CACHEFLUSHALL;
  63. //    MyCaos.M68kStart    =    NULL;
  64. //    MyCaos.M68kSize        =    0;
  65.     MyCaos.PPCCacheMode    =    IF_CACHEFLUSHALL;
  66. //    MyCaos.PPCStart        =    NULL;
  67. //    MyCaos.PPCSize        =    0;
  68.     MyCaos.d0        =(ULONG) id;
  69.     MyCaos.d1        =(ULONG) userdata;
  70.     MyCaos.a0        =(ULONG) text;
  71.     MyCaos.a1        =(ULONG) msgport;
  72.     MyCaos.a2        =(ULONG) taglist;
  73.     MyCaos.caos_Un.Offset    =    (-72);
  74.     MyCaos.a6        =(ULONG) WorkbenchBase;    
  75.     return((struct AppMenuItem *)PPCCallOS(&MyCaos));
  76. }
  77.  
  78. #ifndef NO_PPCINLINE_STDARG
  79. #define AddAppMenuItem(a0, a1, a2, a3, tags...) \
  80.     ({ULONG _tags[] = { tags }; AddAppMenuItemA((a0), (a1), (a2), (a3), (struct TagItem *)_tags);})
  81. #endif /* !NO_PPCINLINE_STDARG */
  82.  
  83. #define    AddAppWindowA(id, userdata, window, msgport, taglist)    _AddAppWindowA(WB_BASE_NAME, id, userdata, window, msgport, taglist)
  84.  
  85. static __inline struct AppWindow *
  86. _AddAppWindowA(void *WorkbenchBase, unsigned long id, unsigned long userdata, struct Window *window, struct MsgPort *msgport, struct TagItem *taglist)
  87. {
  88. struct Caos    MyCaos;
  89.     MyCaos.M68kCacheMode    =    IF_CACHEFLUSHALL;
  90. //    MyCaos.M68kStart    =    NULL;
  91. //    MyCaos.M68kSize        =    0;
  92.     MyCaos.PPCCacheMode    =    IF_CACHEFLUSHALL;
  93. //    MyCaos.PPCStart        =    NULL;
  94. //    MyCaos.PPCSize        =    0;
  95.     MyCaos.d0        =(ULONG) id;
  96.     MyCaos.d1        =(ULONG) userdata;
  97.     MyCaos.a0        =(ULONG) window;
  98.     MyCaos.a1        =(ULONG) msgport;
  99.     MyCaos.a2        =(ULONG) taglist;
  100.     MyCaos.caos_Un.Offset    =    (-48);
  101.     MyCaos.a6        =(ULONG) WorkbenchBase;    
  102.     return((struct AppWindow *)PPCCallOS(&MyCaos));
  103. }
  104.  
  105. #ifndef NO_PPCINLINE_STDARG
  106. #define AddAppWindow(a0, a1, a2, a3, tags...) \
  107.     ({ULONG _tags[] = { tags }; AddAppWindowA((a0), (a1), (a2), (a3), (struct TagItem *)_tags);})
  108. #endif /* !NO_PPCINLINE_STDARG */
  109.  
  110. #define    RemoveAppIcon(appIcon)    _RemoveAppIcon(WB_BASE_NAME, appIcon)
  111.  
  112. static __inline BOOL
  113. _RemoveAppIcon(void *WorkbenchBase, struct AppIcon *appIcon)
  114. {
  115. struct Caos    MyCaos;
  116.     MyCaos.M68kCacheMode    =    IF_CACHEFLUSHALL;
  117. //    MyCaos.M68kStart    =    NULL;
  118. //    MyCaos.M68kSize        =    0;
  119.     MyCaos.PPCCacheMode    =    IF_CACHEFLUSHALL;
  120. //    MyCaos.PPCStart        =    NULL;
  121. //    MyCaos.PPCSize        =    0;
  122.     MyCaos.a0        =(ULONG) appIcon;
  123.     MyCaos.caos_Un.Offset    =    (-66);
  124.     MyCaos.a6        =(ULONG) WorkbenchBase;    
  125.     return((BOOL)PPCCallOS(&MyCaos));
  126. }
  127.  
  128. #define    RemoveAppMenuItem(appMenuItem)    _RemoveAppMenuItem(WB_BASE_NAME, appMenuItem)
  129.  
  130. static __inline BOOL
  131. _RemoveAppMenuItem(void *WorkbenchBase, struct AppMenuItem *appMenuItem)
  132. {
  133. struct Caos    MyCaos;
  134.     MyCaos.M68kCacheMode    =    IF_CACHEFLUSHALL;
  135. //    MyCaos.M68kStart    =    NULL;
  136. //    MyCaos.M68kSize        =    0;
  137.     MyCaos.PPCCacheMode    =    IF_CACHEFLUSHALL;
  138. //    MyCaos.PPCStart        =    NULL;
  139. //    MyCaos.PPCSize        =    0;
  140.     MyCaos.a0        =(ULONG) appMenuItem;
  141.     MyCaos.caos_Un.Offset    =    (-78);
  142.     MyCaos.a6        =(ULONG) WorkbenchBase;    
  143.     return((BOOL)PPCCallOS(&MyCaos));
  144. }
  145.  
  146. #define    RemoveAppWindow(appWindow)    _RemoveAppWindow(WB_BASE_NAME, appWindow)
  147.  
  148. static __inline BOOL
  149. _RemoveAppWindow(void *WorkbenchBase, struct AppWindow *appWindow)
  150. {
  151. struct Caos    MyCaos;
  152.     MyCaos.M68kCacheMode    =    IF_CACHEFLUSHALL;
  153. //    MyCaos.M68kStart    =    NULL;
  154. //    MyCaos.M68kSize        =    0;
  155.     MyCaos.PPCCacheMode    =    IF_CACHEFLUSHALL;
  156. //    MyCaos.PPCStart        =    NULL;
  157. //    MyCaos.PPCSize        =    0;
  158.     MyCaos.a0        =(ULONG) appWindow;
  159.     MyCaos.caos_Un.Offset    =    (-54);
  160.     MyCaos.a6        =(ULONG) WorkbenchBase;    
  161.     return((BOOL)PPCCallOS(&MyCaos));
  162. }
  163.  
  164. #define    WBInfo(lock, name, screen)    _WBInfo(WB_BASE_NAME, lock, name, screen)
  165.  
  166. static __inline void
  167. _WBInfo(void *WorkbenchBase, BPTR lock, STRPTR name, struct Screen *screen)
  168. {
  169. struct Caos    MyCaos;
  170.     MyCaos.M68kCacheMode    =    IF_CACHEFLUSHALL;
  171. //    MyCaos.M68kStart    =    NULL;
  172. //    MyCaos.M68kSize        =    0;
  173.     MyCaos.PPCCacheMode    =    IF_CACHEFLUSHALL;
  174. //    MyCaos.PPCStart        =    NULL;
  175. //    MyCaos.PPCSize        =    0;
  176.     MyCaos.a0        =(ULONG) lock;
  177.     MyCaos.a1        =(ULONG) name;
  178.     MyCaos.a2        =(ULONG) screen;
  179.     MyCaos.caos_Un.Offset    =    (-90);
  180.     MyCaos.a6        =(ULONG) WorkbenchBase;    
  181.     PPCCallOS(&MyCaos);
  182. }
  183.  
  184. #endif /* SASC Pragmas */
  185. #endif /* !_PPCPRAGMA_WB_H */
  186.